import { request } from "@/utils/request";
// 我买的-确认收货 http://localhost:8080/leshi/shopping/confirmReceipt
export const apiConfirmReceipt = (data: any = {}) => {
  return request({
    url: "/shopping/confirmReceipt",
    method: "POST",
    data,
  });
};

// 我买的 http://localhost:8080/leshi/shopping/purchaseList
export const apiOrderBuyList = (data: any = {}) => {
  return request({
    url: "/shopping/purchaseList",
    method: "POST",
    data,
  });
};
// 我卖的 http://localhost:8080/leshi/shopping/sellList
export const apiOrderSellList = (data: any = {}) => {
  return request({
    url: "/shopping/sellList",
    method: "POST",
    data,
  });
};
// 订单详情
export const apiOrderDetail = (data: any = {}) => {
  return request({
    url: "/shopping/purchaseInfo",
    method: "POST",
    data,
  });
};
// 提交订单
export const apiComfirmOrder = (data: any = {}) => {
  return request({
    url: "/shopping/pay",
    method: "POST",
    data,
  });
};
// 调用微信支付
// http://localhost:8080/leshi/wxPay/miniAppPay?shoppingId=sfsfsf
export const wxPayMiniAppPay = (data: any) => {
  return request({
    url: "/wxPay/gxPay",
    // url: "/wxPay/miniAppPay?shoppingId=" + data,
    // url: "/wxPay/miniAppPay",
    method: "POST",
    data
  });
};

// 退款
export const apiIncomeApply = (data: any = {}) => {
  return request({
    url: "/income/apply",
    method: "POST",
    data,
  });
};




export const sendGoods = (data: any = {}) => {
  return request({
    url: "/sendGoods/add",
    method: "POST",
    data,
  });
};



export const dictType = (data: any = {}) => {
  return request({
    url: "/user/dictType",
    method: "POST",
    data,
  });
};


export const incomeConfirm = (data: any = {}) => {
  return request({
    url: "/income/confirm",
    method: "POST",
    data,
  });
};

// 退款原因-查询 http://localhost:8080/leshi/types/refund

export const typesRefund = (data: any = {}) => {
  return request({
    url: "/types/refund",
    method: "POST",
    data,
  });
};
